var=float(input())

x=[2,4]
y=[1.69 ,2.1]
y1=[1.5,2.2]
result=0

tem1=(var-x[1])/(x[0]-x[1])
tem2=(var-x[0])/(x[1]-x[0])
result+=((1+2*tem2)*tem1*tem1)*y[0]
result+=((1+2*tem1)*tem2*tem2)*y[1]

result+=(var-x[0])*tem1*tem1*y1[0]
result+=(var-x[1])*tem2*tem2*y1[1]

print("%.2f"%result)